#ifndef _SMP_MENUWND_H
#define _SMP_MENUWND_H

#include "sgl_funcs.h"
#include "sgl_window.h"

/*
enum {
	SMP_WNDMENU_WNDPROC
};

#define SMP_WNDMENU_WNDPROC  MPS_CODE_SMP_MENUWND_PROC
*/

/**
  \defgroup smp_menuwnd Simple Menu Based Window

  This is not a window or control shown in the parent window.
  It is just a window procedure to add function to a parent window in this case:
  When the menu show on a top-level window, the toolbar should change
  it's left/right softkey to "OK/Cancel". Just call this function as the default window procedure
  of your top-level window which has the popup menu.
  
  \code
	LRESULT  YOUR_WINDOW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
	{
		switch(Msg)
		{
			//handle your messages
		}

		//call this function as default
		return SMP_MenuWnd_WndProc(hWnd, Msg, wParam, lParam);
	}
  
  \endcode

  @ingroup controls
  @{
 */

	/**
	 * \name Window Procedure
	 * @{
	 */

/**
 * \brief The menu based window procedure.
 *
 * \param hWnd the window handle
 * \param Msg the window message
 * \param wParam the first parameter
 * \param lParam the second parameter
 * \return the result of the process
 */
#if defined(INCLUDE_IN_PLUG_SGL_SRC) || defined(SDK_NO_PLUGIN)
LRESULT SMP_MenuWnd_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 
#else
#define SMP_MenuWnd_WndProc(hWnd, Msg, wParam, lParam) \
	(LRESULT)mrc_extSendAppEventEx(MPS_CODE_SMP_MENUWND_PROC, (int32)hWnd, (int32)Msg, (int32)wParam, (int32)lParam, (int32)0, (int32)0)
#endif

	/** @} */

/** @} end of smp_menuwnd */


#endif

